public class Person {
    private String id;   //人员编号
    private String  name;  //姓名


    protected String address; //受保护的属性(子类可访问)

    public Person() {
        System.out.println("执行Person胡无参构造");
    }

    public void  work() {
        System.out.println("人员在工作");
    }


    //构造方法
    public Person (String id, String name) {
        this.id = id;
        this.name = name;
    }
    //getter/setter方法
    public String getId() { return id;}
    public void setId(String id) { this.id = id;}
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    //显示基本信息
    public void showInfo() {
        System.out.println("编号:"+ id +",:"+name);

        }
}
